<template>
  <div id="app">
    <navbar class="navbar"></navbar>

    <div class="router-page">
      <transition :name="$store.state.transition">
        <router-view />
      </transition>
    </div>
  </div>
</template>

<script>
import navbar from "./components/common/navbar.vue"
export default {
  components: {
    navbar
  }
}
</script>

<style>
html,
body,
#app {
  height: 100%;
  width: 100%;
  margin: 0;
}

.navbar {
  height: 46px;
  width: 100%; /*必须沾满宽度防止浮动*/
  /* float: left; 必须 */
}

.router-page {
  position: absolute;
  top: 46px;
  bottom: 0px;
  width: 100%;
}

.full-page {
  position: absolute;
  top: 0px;
  bottom: 0px;
  width: 100%;
}

.slide-left-enter-active,
.slide-left-leave-active,
.slide-right-enter-active,
.slide-right-leave-active {
  transition-duration: 0.5s;
  transition-property: height, opacity, transform;
  transition-timing-function: cubic-bezier(0.55, 0, 0.1, 1);
  overflow: hidden;
}

.slide-left-enter,
.slide-right-leave-active {
  opacity: 0;
  transform: translate(2em, 0);
}

.slide-left-leave-active,
.slide-right-enter {
  opacity: 0;
  transform: translate(-2em, 0);
}
</style>
